<%= form_for(@card) do |f| %>
  <% if @card.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@card.errors.count, "error") %> prohibited this card from being saved:</h2>

      <ul>
      <% @card.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :user_id %><br />
    <%= f.number_field :user_id %>
  </div>
  <div class="field">
    <%= f.label :book_id %><br />
    <%= f.number_field :book_id %>
  </div>
  <div class="field">
    <%= f.label :date_borrowed %><br />
    <%= f.date_select :date_borrowed %>
  </div>
  <div class="field">
    <%= f.label :date_due %><br />
    <%= f.date_select :date_due %>
  </div>
  <div class="field">
    <%= f.label :date_returned %><br />
    <%= f.date_select :date_returned %>
  </div>
  <div class="field">
    <%= f.label :is_lost %><br />
    <%= f.check_box :is_lost %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
